#include <iostream>

typedef double wages;
typedef wages base, *p;
typedef char *pstring;
typedef int *pint;

#define base2 base

using int64_t = long long;

int main() {
    wages wage = 10.5;
    base wage2 = 10.67;
    p pwage = &wage2;
    base2 wage3 = 10.234;

    int64_t k = 123450234;

    // 下面这句话等价于 char * const str = "hello world"
    // 也就是说str本身不能改，也就是一个指针常量
    const pstring str = nullptr;

    int a[] = {1, 2, 3, 4, 5};

    for (int i = 0; i < 5; ++i) std::cout << a[i] << ' ';
    std::cout << std::endl;

    const pint b = a;
    *b = 10;

    for (int i = 0; i < 5; ++i) std::cout << a[i] << ' ';
    std::cout << std::endl;

    pint const c = a;
    *c = 20;

    for (int i = 0; i < 5; ++i) std::cout << a[i] << ' ';
    std::cout << std::endl;

    {
        int i = 10;
        decltype(i) a = 10;
        decltype((i)) b = i;
        decltype((2 + 3)) c;
    }

    return 0;
}